# def greet_user():
#     """显示简单的问候语"""
#     print("hello!")
# greet_user()
# def greet_user(username):
#     print("hello, " + username.title() + "!")
# greet_user("jack")
# def describe_pets(animal_type, pet_name):
#     print("i have a " + animal_type + ".")
#     print("my " + animal_type + "'s name is " + pet_name + "." )
# describe_pets("hamster" ,"harry")
# def describe_pets(pet_name, animal_type = "dog"):
#     print("i have a " + animal_type + ".")
#     print("my " + animal_type + "'s name is " + pet_name + "." )
# describe_pets("harry")
# def get_formatted_name(first_name, last_name, middle_name = " "):
#     if middle_name:
#         full_name = first_name + " " + middle_name + " " + last_name
#     else:
#         full_name = first_name + " " + last_name
#     return (full_name.title())
# musician = get_formatted_name("jimi", "hendrix", "lee")
# print(musician)
# def build_person(first_name, last_name, age = " "):
#     person = {"first": first_name, "last": last_name}
#     if age:
#         person["age"] = age
#     return person
# musician = build_person("hook", "black", age = 31)
# print(musician)
# def get_formatted_name(first_name, last_name):
    # full_name = first_name + " " + last_name
    # return full_name.title()
# while True:
    # print("please tell me what's your name? ")
    # first_name = input("first name: ")
    # last_name = input("last name: ")
    # if first_name == "q" and last_name == "q":
        # break
    # formatted_name = get_formatted_name(first_name,last_name)
    # print("hello! " + formatted_name)
# def greet_users(names):
	# for name in names:
		# message = "hello, " + name.title() + "!"
		# print(message)
# # usernames = ["hana", "miya", "julia"]
# # greet_users(usernames)
# usernames = greet_users(["hana", "miya", "julia"])
# unprint_designs = ["iphone", "huawei", "xiaomi"]
# completed_models = []
# while unprint_designs:
	# current_designs = unprint_designs.pop()
	# print("pringting model: " + current_designs)
	# completed_models.append(current_designs)
# print("\nthe following models have been printed: ")
# for model in completed_models:
	# print(model)
# def make_pizza(*toppings):
	# print("makeing a pizza with the following toppings: ")
	# for topping in toppings:
		# print("-" + topping)
# make_pizza("perperorni")
# make_pizza("mushrooms", "green peppers", "extra cheese
# def make_pizza(size, *toppings):
	# print("\nmaking a " + str(size) + 
	    # "-inch pizza with the following toppings: ")
	# for topping in toppings:
		# print("- " + topping)
# make_pizza(16,"pepperoni")
# make_pizza(12, "mushrooms", "green peppers", "extra cheese")
def build_profile(first, last, **user_info):
	profile = {}
	profile["first"] = first
	profile["last"] = last
	for key, value in user_info.items():
		profile[key] = value
	return profile
user_info = build_profile("albert", "einstein",
                          location = "princeton",
                          field = "physics")
print(user_info)
		
	

